﻿// copyright (c) 2025 author:fio66<fio66@foxmail.com>. All rights reserved.
// date: 2025-08-21 16:20:03

#include "src/utils.h"

namespace fio66 {
namespace utils {
namespace {
thread_local char av_ts_max_string[AV_TS_MAX_STRING_SIZE] = {0};
thread_local char av_err_max_string[AV_ERROR_MAX_STRING_SIZE] = {0};
}  // namespace

char* AVTs2TimeStr(int64_t ts, const AVRational* tb) {
  return av_ts_make_time_string(av_ts_max_string, ts, tb);
}

char* AVErr2Str(const int err_num) {
  return av_make_error_string(av_err_max_string, AV_ERROR_MAX_STRING_SIZE, err_num);
}
}  // namespace utils

}  // namespace fio66
